const Article = require('../../models/article')

module.exports = (req,res) => {
  // console.log(req.query);
  const author = req.query.author
  // console.log(author);
  Article.find({ author }, (err, articleDoc) => {
    console.log(articleDoc.length);
    res.status(200).json({
      err_code: 0,
      data:articleDoc
    })
  })
}